<?php

	global $HTTP_GET_VARS;
	global $HTTP_POST_VARS;
	global $account;
	global $account_state;
	global $error;
	global $sql_row, $sql, $sql_total;
	
	$username = $_GET['account'];

	if ( $account_state == 0)
	{
		error_redirect('Admin-Site is Admin-Only, please validate yourself as Admin-Guy.',ERROR_LOGIN_REQUIRED,'../distribution/?action=showuser_hex&account='.$username);
	}
	if ($account['admin'] != 1)
	{
		error_redirect('Admin-Site is Admin-Only, your was insuccessfully validated as Admin-Guy.',ERROR_ILLEGAL_REQUEST);
	}
	if ( $account_state == 1 && $account['admin'] == 1)
	{
		$register_slot = sql("SELECT username FROM distribution_register WHERE MD5(username)='".$username."'");
		
		error_redirect('../distribution/?action=showuser&account='.$sql_row[$register_slot]['username'],OVERRIDE_REDIRECT_RELATIVE);
		
		clearslot($register_slot);
	}
	else
	{
		error_redirect('ASSERTION FAILURE: $account_state must be either 0 or 1 and $account[\'admin\'] must be 1 or any other value',ERROR_SERVER_ERROR);
	}
?>